# Contributor: knuxify <knuxify@gmail.com>
# Maintainer: team/gnome <knuxify@gmail.com>
pkgname=xdg-desktop-portal-gnome
pkgver=45.1
pkgrel=0
pkgdesc="backend implementation for xdg-desktop-portal for the GNOME desktop environment"
url="https://gitlab.gnome.org/GNOME/xdg-desktop-portal-gnome"
arch="all"
license="LGPL-2.1-or-later"
depends="xdg-desktop-portal xdg-desktop-portal-gtk"
makedepends="
	gnome-desktop-dev
	gsettings-desktop-schemas-dev
	gtk4.0-dev
	libadwaita-dev
	meson
	xdg-desktop-portal-dev
	"
subpackages="$pkgname-lang"
source="https://download.gnome.org/sources/xdg-desktop-portal-gnome/${pkgver%.*}/xdg-desktop-portal-gnome-$pkgver.tar.xz"
options="!check"  # no tests

build() {
	abuild-meson \
		-Db_lto=true \
		-Dsystemduserunitdir=/DELETEME \
	.  output
	meson compile -C output
}

check() {
	meson test --no-rebuild --print-errorlogs -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
	rm -rf "$pkgdir"/DELETEME
}

sha512sums="
576139ef4d763e47435a33ecd94ae8d1631c2a515c11ca18e1f1f7618421925a41f0f8a295cfe6d1be377fd162a9e4d239f3a94a73a4aae49e583a0360f8cc36  xdg-desktop-portal-gnome-45.1.tar.xz
"
